package com.heihei.itextdemo.controller;

import com.heihei.itextdemo.dto.CommonResponseDTO;
import com.heihei.itextdemo.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.FileNotFoundException;

/**
 * 专门用于测试或者构建数据用的接口（临时接口）
 */
@RestController
@RequestMapping("/test")
@Api(value = "专门用于测试或者构建数据用的接口（临时接口）", tags = "专门用于测试或者构建数据用的接口（临时接口）")
public class TestController {
    @Resource
    private TestService testService;

    /**
     * 添加本地图片path
     * @param gender 1男 2女
     */
    @PostMapping("/add-local-img")
    @ApiOperation(value = "添加本地图片path", notes = "添加本地图片path")
    public CommonResponseDTO<String> addLocalImgPath(Integer gender) throws FileNotFoundException {
        return testService.addLocalImgPath(gender);
    }


}
